import { defineStore } from "pinia";
export const useLayoutStore = defineStore("layout", {
  state: () => {
    return {
      mobile: false, // 是否是移动端
      layout: "classic", // layout布局
    };
  },
  actions: {
    setLayout(layout) {
      if (this.mobile && layout !== "classic") {
        return ElMessage.warning("移动端模式下不支持切换其它布局");
      }
      this.layout = layout;
    },
  },
});
